<template>
  <div class="container">
    <div class="header">
      <div class="status">
        <div class="content">预付成功</div>
      </div>
      <div class="code">FSYX1254365</div>
      <div class="title">核销码</div>
      <div class="cutLine">
        <img src="@/assets/icons/cutLine.png" alt />
      </div>
      <div class="gift">
        <div class="giftTitle">万元红包券</div>
        <div class="giftItem">
          <div class="dot"></div>
          <span>999元抵车款</span>
        </div>
        <div class="giftItem">
          <div class="dot"></div>
          <span>999元抵车款</span>
        </div>
        <div class="giftItem">
          <div class="dot"></div>
          <span>999元抵车款</span>
        </div>
        <div class="giftItem">
          <div class="dot"></div>
          <span>999元抵车款</span>
        </div>
      </div>
    </div>
    <div class="orderInfo">
      <div class="orderItem">
        <div class="left">姓名</div>
        <div class="right">张志强</div>
      </div>
      <div class="orderItem">
        <div class="left">手机号码</div>
        <div class="right">15126302260</div>
      </div>
      <div class="orderItem">
        <div class="left">购车经销商</div>
        <div class="right">先烈中路东风日产4s店</div>
      </div>
      <div class="orderItem">
        <div class="left">订单日期</div>
        <div class="right">2019-07-19 19:23</div>
      </div>
      <div class="orderItem">
        <div class="left">支付金额</div>
        <div class="right">¥999.00</div>
      </div>
      <div class="orderItem">
        <div class="left">备注</div>
        <div class="right">暂无备注</div>
      </div>
      <div class="orderItem">
        <div class="left">订单状态</div>
        <div class="right">支付成功</div>
      </div>

      <div class="btnOp">
        <div class="cancel" @click="cancelOrder" v-if="!sureCancel">取消订单</div>
        <div class="sureBtn" v-if="sureCancel">
          <div>确定取消</div>
          <div style="background:rgba(230,0,32,1)" @click="sureCancel=false">暂不取消</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
        sureCancel:false
    };
  },
  methods: {
    cancelOrder() {
        this.sureCancel = true;
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  background-color: #ffffff;
  width: 3.35rem;
  margin-left: 0.2rem;
  margin-top: 0.18rem;
  .header {
    .status {
      padding-top: 0.16rem;
      .content {
        margin-left: 2.6rem;
        width: 0.72rem;
        height: 0.28rem;
        background: rgba(230, 0, 32, 1);
        border-radius: 1rem 1px 1px 1rem;
        font-size: 0.14rem;
        font-family: PingFangSC-Medium;
        font-weight: 500;
        color: rgba(255, 255, 255, 1);
        line-height: 0.28rem;
        text-align: center;
      }
    }
    .code {
      height: 0.29rem;
      font-size: 0.21rem;
      font-family: PingFangSC-Medium;
      font-weight: 500;
      color: rgba(24, 24, 24, 1);
      text-align: center;
    }
    .title {
      font-size: 0.14rem;
      font-family: PingFangSC-Regular;
      font-weight: 400;
      color: rgba(102, 102, 102, 1);
      text-align: center;
    }
    .cutLine {
      width: 3.35rem;
      height: 0.36rem;
      img {
        width: 3.35rem;
        height: 0.36rem;
      }
    }
    .gift {
      width: 2.95rem;
      height: 1.61rem;
      background: rgba(247, 247, 247, 1);
      border-radius: 0.04rem;
      padding: 0.16rem;
      padding-left: 0.23rem;
      margin-left: 0.2rem;
      .giftTitle {
        font-size: 15px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(0, 0, 0, 1);
        display: inline-block;
      }
      .giftItem {
        margin-top: 0.08rem;
        .dot {
          width: 0.04rem;
          height: 0.04rem;
          background: rgba(230, 0, 32, 1);
          display: inline-block;
          vertical-align: middle;
          margin-right: 0.06rem;
        }
        span {
          font-size: 0.13rem;
          font-family: PingFangSC-Regular;
          font-weight: 400;
          color: rgba(153, 153, 153, 1);
        }
      }
    }
  }
  .orderInfo {
    margin-top: 0.08rem;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    width: 3.35rem;
    .orderItem {
      margin-top: 0.08rem;
      .left {
        font-size: 0.13rem;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(153, 153, 153, 1);
        display: inline-block;
      }
      .right {
        float: right;
        font-size: 0.13rem;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(0, 0, 0, 1);
        display: inline-block;
      }
    }
    .btnOp {
      padding-top: 0.2rem;
      padding-bottom: 0.2rem;
      .cancel {
        width: 2.96rem;
        height: 0.48rem;
        background: rgba(204, 204, 204, 1);
        border-radius: 1px;
        line-height: 0.48rem;
        text-align: center;
        font-size: 0.15rem;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(255, 255, 255, 1);
      }
      .sureBtn {
          display: flex;
          justify-content: space-between;
        div {
          display: inline-block;
          width: 1.4rem;
          height: 0.48rem;
          background: rgba(204, 204, 204, 1);
          border-radius: 1px;
          line-height: 0.48rem;
          text-align: center;
          font-size: 0.15rem;
          font-family: PingFangSC-Regular;
          font-weight: 400;
          color: rgba(255, 255, 255, 1);
        }
      }
    }
  }
}
</style>

